//c1
using System;

class ArrayStats
{
    static void Main()
    {
        int[] numbers = { 5, 2, 8, 1, 9, 3, 7, 4, 6 };

        int max = numbers[0];
        for (int i = 1; i < numbers.Length; i++)
        {
            if (numbers[i] > max)
            {
                max = numbers[i];
            }
        }

        int min = numbers[0];
        for (int i = 1; i < numbers.Length; i++)
        {
            if (numbers[i] < min)
            {
                min = numbers[i];
            }
        }

        int sum = 0;
        for (int i = 0; i < numbers.Length; i++)
        {
            sum += numbers[i];
        }

        double average = (double)sum / numbers.Length;

        Console.WriteLine("最大值: "+max);
        Console.WriteLine("最小值:"+min);
        Console.WriteLine("平均值: "+average.ToString("0.00"));
        Console.WriteLine("总和:"+sum);
    }
}